package qsoft.omanga.ui;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import qsoft.omanga.business.entities.Manga;
import qsoft.omanga.ui.adapter.MangaAdapter;

/**
 * 
 * @author sontt
 * 
 */
public class ListAllMangaActivity extends Activity {
	/**
     * 
     */
	private ListView listViewManga;
	/**
     * 
     */
	private MangaAdapter mangaAdapter;

	private String[] urls = {
			"http://1.bp.blogspot.com/-RhZgGcJlESY/TudBidjtbpI/AAAAAAAAACA/xeJfBMse2Gg/s640/3.jpg",
			"http://2.bp.blogspot.com/-wEtkEJLTYfI/TudB9QFRe2I/AAAAAAAAACI/I74XrGPGF7Y/s640/4.jpg",
			"http://4.bp.blogspot.com/-Y9RuJxo-wOw/TudCY0FCxGI/AAAAAAAAACQ/k61oKDki6LQ/s640/5.jpg",
			"http://www.scenicreflections.com/files/cute,sexy_asian_girl,bikini,6_Wallpaper__yvt2.jpg",
			"http://clubs.7msport.com/en/UserPhoto/54907/e5508cce7752416c97085378ebf98439f68e8e36f55e45e3855985a1398e43f0.jpg",
			"http://image1.xahoi.com.vn/news/2012/2/11/20/d041a4a1975e24c7471064b8jpg1328929293.jpg",
			"http://image1.xahoi.com.vn/news/2012/2/11/20/373bc4b43b41a7548ad4b271jpg1328929294.jpg",
			"http://image1.xahoi.com.vn/news/2012/2/11/20/35e940df15c43a504954039ejpg1328929295.jpg",
			"http://image1.xahoi.com.vn/news/2012/2/11/20/AkiHoshino6jpg1328929296.jpg",
			"http://image1.xahoi.com.vn/news/2012/2/11/20/akihoshino075jpg1328929297.jpg",
			"http://image1.xahoi.com.vn/news/2012/2/11/20/AkiHoshino9jpg1328929297.jpg",
			"http://k14.vcmedia.vn/Images/Uploaded/Share/2011/03/16/67.jpg",
			"http://image.tin247.com/kenh14/100924004119-95-796.jpg",
			"http://image.tin247.com/kenh14/100924004119-505-953.jpg",
			"http://image.tin247.com/kenh14/100924004119-638-175.jpg",
			"http://image.tin247.com/kenh14/100924004119-86-725.jpg",
			"http://image.tin247.com/kenh14/100924004119-635-352.jpg",
			"http://dantri.vcmedia.vn/Uploaded/vannt1/fi101213.jpg",
			"http://dantri.vcmedia.vn/Uploaded/vannt1/fi101223.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh1.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh2.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh4.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh6.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh7.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh7.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh9.jpg",
			"http://anh.eva.vn/upload/news/2011-08-04/1312429455-kxybb1299555963.jpg",
			"http://anh.eva.vn/upload/news/2011-08-04/1312429415-1299546975-ngoc-trinh-bikini-08.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh8.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh11.jpg",
			"http://anh.eva.vn/upload/2-2011/images/2011-04-17/1303005842-ngoc-trinh13.jpg",
			"http://dantri.vcmedia.vn/Uploaded/vannt1/fi101213.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/bikini_girl_anh_dep_Anh_dep_19_09_2007_7172.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_Some_girl_4956.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_Japan_girl_03_07_2007_3713.jpg",
			"http://img.tamtay.vn/files/2008/07/16/trainb86/photos/309127/492d17de_bikini_girl12.jpg",
			"http://img.tamtay.vn/files/2008/07/16/trainb86/photos/309127/492d17e2_bikini_girl15.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_icon_Rina_Nagasaki_1634.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_icon_Xinh_Xinh_1771.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_icon_Xinh_Xinh_1768.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_9.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/_icon_Xinh_Xinh_1738.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_8.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/anh_dep_nguoi_mau_girl_icon_Em_rat_xinh_Yuko_Ogura_349.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_icon_Xinh_Xinh_1767.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_21.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_28.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_25.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat_icon_Bikini__Girl_1758.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_13.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_29.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_18.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_ao_tam_nguoi_mau_nhat__girl_icon_Momoko_Komachi_24.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_China_Girl_27_5_2007_2422.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/girl_icon_girl_xinh_6420.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_China_Girl_27_5_2007_2427.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_China_Girl_03_06_2007_2698.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Nhat_ban_anh_dep_icon_Xinh_xinh_girl_1581.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_China_Girl_25_06_2007_3457.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_China_Girl_27_5_2007_2426.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Tren_giuong_icon_Xinh_khong_1797.jpg",
			"http://files.myopera.com/tuyencntt/albums/405258/Bikini_icon_Japan_girl_03_07_2007_3710.jpg",
			"http://cB1.upanh.com/19.0.25117030.KLx0/kmdel237.jpg",
			"http://cB8.upanh.com/19.0.25117037.A8x0/kmdel239.jpg",
			"http://cB5.upanh.com/19.0.25117044.FUy0/kmdel240.jpg",
			"http://cB1.upanh.com/19.0.25117050.h280/kmdel242.jpg",
			"http://cB8.upanh.com/19.0.25117057.lh40/kmdel243.jpg",
			"http://cB1.upanh.com/19.0.25117060.m3J0/kmdel244.jpg",
			"http://cB2.upanh.com/19.0.25117071.ywe0/kmdel245.jpg",
			"http://cB8.upanh.com/19.0.25117077.ug0/kmdel246.jpg",
			"http://cB4.upanh.com/19.0.25117083.T6t0/kmdel247.jpg",
			"http://cB4.upanh.com/19.0.25117093.5Bl0/kmdel248.jpg",
			"http://cB6.upanh.com/19.0.25117105.Npq0/kmdel249.jpg",
			"http://cB2.upanh.com/19.0.25117111.3Su0/kmdel253.jpg",
			"http://cB9.upanh.com/19.0.25117118.hdA0/kmdel254.jpg",
			"http://cB7.upanh.com/19.0.25117126.DGz0/kmdel255.jpg",
			"http://cB9.upanh.com/19.0.25117138.ouX0/kmdel256.jpg",
			"http://cB5.upanh.com/19.0.25117144.WRh0/kmdel258.jpg",
			"http://cB2.upanh.com/19.0.25117151.DRz0/kmdel260.jpg",
			"http://cB9.upanh.com/19.0.25065978.cmy0/kmdel189.jpg",
			"http://cB1.upanh.com/19.0.25065980.eFn0/kmdel192.jpg",
			"http://cb9.upanh.com/19.0.25065988.8QG0/kmdel193.jpg",
			"http://cb8.upanh.com/19.0.25065997.cMK0/kmdel194.jpg",
			"http://cb2.upanh.com/19.0.25066001.5aM0/kmdel196.jpg",
			"http://cb5.upanh.com/19.0.25066004.zN50/kmdel197.jpg", };

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.e("mm", "ccccccccccccccccccccccccccccccc");
		setContentView(R.layout.list_all);
		List<Manga> listMangas = initManga();
		listViewManga = (ListView) findViewById(R.id.listAllManga);
		mangaAdapter = new MangaAdapter(this.getApplicationContext(),
				listMangas, false);
		listViewManga.setAdapter(mangaAdapter);
	}

	public List<Manga> initManga() {
		List<Manga> list = new ArrayList<Manga>();
		int length = urls.length;
		for (int i = 0; i < length; i++) {
			Manga manga = new Manga();
			manga.setId(String.valueOf(i + 1));
			manga.setPicLarge(urls[i]);
			list.add(manga);
		}
		return list;
	}
}
